import request from '@/utils/request'

// 创建生长模型列
export function createModuleList(data) {
  return request({
    url: '/growth/module-list/create',
    method: 'post',
    data: data
  })
}

// 更新生长模型列
export function updateModuleList(data) {
  return request({
    url: '/growth/module-list/update',
    method: 'put',
    data: data
  })
}

// 删除生长模型列
export function deleteModuleList(id) {
  return request({
    url: '/growth/module-list/delete?id=' + id,
    method: 'delete'
  })
}

// 获得生长模型列
export function getModuleList(id) {
  return request({
    url: '/growth/module-list/get?id=' + id,
    method: 'get'
  })
}

// 获得生长模型列分页
export function getModuleListPage(query) {
  return request({
    url: '/growth/module-list/page',
    method: 'get',
    params: query
  })
}

// 导出生长模型列 Excel
export function exportModuleListExcel(query) {
  return request({
    url: '/growth/module-list/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
